// 商品分类请求
import request from '@/utils/request'

// 获取商品分类列表
export const getGoodsCateList = params =>{
  return request({
    method:'get',
    url:'categories',
    params
  })
}

// 获取父级分类列表
export const getParentCateList = params => {
  return request({
    method:'get',
    url:'categories',
    params
  })
}

// 添加分类

export const addCate = data => {
  return request({
    method:'post',
    url:'categories',
    data
  })
}

// 删除分类
export const deleteCate = id => {
  return request({
    method: 'delete',
    url:`categories/${id}`
  })
}